package com.example.net

import com.example.net.entity.CommentEntity
import com.example.net.entity.DanMuEntity
import com.example.net.entity.FollowEntity
import com.example.net.entity.LoginEntity
import com.example.net.entity.MutilTypeEntity
import com.example.net.entity.MutilVideoEntity
import com.example.net.entity.RecommonVideoEntity
import com.example.net.entity.Res
import com.example.net.entity.SimpleVideoEntity
import com.example.net.entity.VideoTypeEntity
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiService {
	@GET("/videotype/getSimpleType")
	suspend fun getVideoType():Res<List<VideoTypeEntity>>
	@POST("/user/login")
	suspend fun login(@Query("password")pwd:String,@Query("username")username:String):Res<LoginEntity>
	@GET("/videosimple/getSimpleVideoByChannelId")
	suspend fun getSimpleVideo(@Query("channelId")id:String,@Query("page")page:Int,@Query("pagesize")size:Int):Res<List<SimpleVideoEntity>>
	@POST("/focuse/focuse")
	suspend fun followUser(@Query("focuseUserid")uId:Int,@Query("focusedUserid")nid:Int):Res<FollowEntity>
	@GET("/videosimple/getRecommendSimpleVideo")
	suspend fun getRecommendVideo(@Query("page")page:Int,@Query("pagesize")size:Int):Res<List<RecommonVideoEntity>>
	@GET("/comment/getCommentByUserId")
	suspend fun getComment(@Query("datatype")type:Int,@Query("itemid")id:String):Res<List<CommentEntity>>
	@POST("/comment/publishComment")
	suspend fun putComment(@Body commentEntity: CommentEntity):Res<CommentEntity>
	@GET("/videotype/getMutilType")
	suspend fun getMutilType():Res<List<MutilTypeEntity>>
	@GET("/videotype/getMutilTypeByPid")
	suspend fun getMutilTypeByPid(@Query("pid")pid:Int):Res<List<MutilTypeEntity>>
	@GET("/bulletscreen/getBulletScreenInfo")
	suspend fun getDanmu(@Query("datatype")type:Int,@Query("itemid")item:String):Res<List<DanMuEntity>>
	@GET("/videomulti/getMutilVideoByTypeId")
	suspend fun getMutilVideo(@Query("page")page: Int,@Query("pagesize")size:Int,@Query("typeid")type:Int)
	:Res<List<MutilVideoEntity>>
	@GET("/videomulti/getRecommendMutilVideo")
	suspend fun getRecommendMutilVideo(@Query("page")page: Int,@Query("pagesize")size:Int):Res<List<RecommonVideoEntity>>
}